#include <iostream>  
  
using namespace std;  
  
int main() {  
    int n;  
    cout << "请输入一个正整数n：";  
    cin >> n;  
    int sum = 0;  
    for (int i = 1; i <= n; i++) {  
        sum += i;  
    }  
    cout << "1到" << n << "的连续整数和为：" << sum << endl;  
    return 0;  
}
